<?php 
	
	$client_id = client_id_gmail;
	$redirect_uri = hostname.'gmail/oauth.php';

	$Location = "https://accounts.google.com/o/oauth2/auth?client_id=".$client_id."&redirect_uri=".$redirect_uri."&scope=https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile&state=/profile&response_type=code";
	header("Location: ".$Location);

?>